package com.example.administrator.myfirst;

import android.support.v4.app.FragmentActivity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.alibaba.android.arouter.launcher.ARouter;

public class MainActivity extends FragmentActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


        findViewById(R.id.tv_dialog).setOnClickListener(this);
        findViewById(R.id.tv_rec).setOnClickListener(this);



    }

    @Override
    public void onClick(View v) {
        Bundle bundle=new Bundle();
        switch (v.getId()) {
            case R.id.tv_dialog:

                bundle.putString("text","MYDialog");
                ARouter.getInstance().build("/dialog/myDialogAct").with(bundle).navigation();

                break;

            case R.id.tv_rec:
                bundle.putString("text","我是rectesst");
                ARouter.getInstance().build("/rec/rec_mainAct").with(bundle).navigation();

                break;




        }

    }
}
